<template>
  <h1>Movie</h1>
  <p>count组件中的num数据是:{{ num }}</p>
  <button @click="getMovieList">获取电影列表</button>
  <ul>
    <li v-for="item in movieList" :key="item.albumId">
      {{ item.albumName }}
    </li>
  </ul>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
export default defineComponent({
  name: 'Movie',
});
</script>
<script lang="ts" setup>
import useCountState from '@/store/count/index';
import useMovieState from '@/store/movie/index';
import { storeToRefs } from 'pinia';

const countState = useCountState();
const movieState = useMovieState();

const { num } = storeToRefs(countState);
const { movieList } = storeToRefs(movieState);

const { getMovieList } = movieState;
</script>

<style lang="less" scoped></style>
